package com.fjnu.dto;

import java.util.List;

/**
 * 分页结果封装类
 */
public class PageResult<T> {
    private Integer pageNum;   // 当前页码
    private Integer pageSize;  // 每页条数
    private Long total;        // 总记录数
    private List<T> list;      // 分页数据

    public PageResult(Integer pageNum, Integer pageSize, Long total, List<T> list) {
        this.pageNum = pageNum;
        this.pageSize = pageSize;
        this.total = total;
        this.list = list;
    }

    // Getter和Setter
    public Integer getPageNum() { return pageNum; }
    public void setPageNum(Integer pageNum) { this.pageNum = pageNum; }
    public Integer getPageSize() { return pageSize; }
    public void setPageSize(Integer pageSize) { this.pageSize = pageSize; }
    public Long getTotal() { return total; }
    public void setTotal(Long total) { this.total = total; }
    public List<T> getList() { return list; }
    public void setList(List<T> list) { this.list = list; }
}